import java.util.InputMismatchException;
import java.util.Scanner;
import java.util.Random;
public class Jisuan
{
public static void main(String[]args)
{ 
  Scanner r = new Scanner(System.in);
  Random g = new Random();
  System.out.println("how many do you need?");
  int num1 = r.nextInt();
  int choose = g.nextInt(4);
  int sum = 0;
  for(int ci = 0;ci<num1;ci++)
 {
  switch(choose)
   {
      case 0:
           int a,b,c,d,e,f,gg;
              a = g.nextInt(101);
              b = g.nextInt(101);
              c = g.nextInt(101);
              d = g.nextInt(101);
              e = a*d+c*b;
              f = b*d;
           System.out.println(a + "/" + b + "+" + c + "/"+ d+ "=");
           gg = r.nextInt();
           if(gg==e/f){
             System.out.println("ture");
             sum = sum + 1;
                     }
           else
             System.out.println("wrong");
             break;
      case 1:
           int h,i,j,k,l,m,n; 
              h = g.nextInt(101);
              i = g.nextInt(101);
              j = g.nextInt(101);
              k = g.nextInt(101);
              l = h*k-j*i;
              m = i*k;
           System.out.println(h + "/" + i + "-" + j + "/"+ k+ "=");
           n = r.nextInt();
           if(n==l/m){
             System.out.println("ture");
             sum = sum + 1;
                     }
           else
             System.out.println("wrong");
             break;
      case 2:
           int p,q,tt,s,t,u,v;
              p = g.nextInt(101);
              q = g.nextInt(101);
              tt = g.nextInt(101);
              s = g.nextInt(101);
              t = p*tt;
              u = q*s;
           System.out.println((p + "/" + q) + "*" +( t + "/"+ s)+ "=");
           v = r.nextInt();
           if(v==t/u){
             System.out.println("ture");
             sum = sum + 1;
                     }
           else 
             System.out.println("wrong");
             break;
      case 3:
           int o,w,x,y,z,pq,ab;  
              o = g.nextInt(101);
              w = g.nextInt(101);
              x = g.nextInt(101);
              y = g.nextInt(101);
              z = o/w;
              pq = x/y;
           System.out.println((o + "/" + w) + "/" +( x + "/"+ y)+ "=");
           ab = r.nextInt();
           if(ab==z/pq){
             System.out.println("ture");
             sum = sum + 1;
                     }
           else
           System.out.println("wrong");
           break;
}}
           System.out.println("You have correct:" + sum);
}}




